package com.ruoyi.wcf.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wcf.mapper.WcfPlateManageMapper;
import com.ruoyi.wcf.domain.WcfPlateManage;
import com.ruoyi.wcf.service.IWcfPlateManageService;

/**
 * 展示板块管理Service业务层处理
 *
 * @author LCL
 * @date 2022-04-06
 */
@Service
public class WcfPlateManageServiceImpl implements IWcfPlateManageService
{
    @Autowired
    private WcfPlateManageMapper wcfPlateManageMapper;

    /**
     * 查询展示板块管理
     *
     * @param plateId 展示板块管理主键
     * @return 展示板块管理
     */
    @Override
    public WcfPlateManage selectWcfPlateManageByPlateId(Long plateId)
    {
        return wcfPlateManageMapper.selectWcfPlateManageByPlateId(plateId);
    }

    /**
     * 查询展示板块管理列表
     *
     * @param wcfPlateManage 展示板块管理
     * @return 展示板块管理
     */
    @Override
    public List<WcfPlateManage> selectWcfPlateManageList(WcfPlateManage wcfPlateManage)
    {
        return wcfPlateManageMapper.selectWcfPlateManageList(wcfPlateManage);
    }

    /**
     * 新增展示板块管理
     *
     * @param wcfPlateManage 展示板块管理
     * @return 结果
     */
    @Override
    public int insertWcfPlateManage(WcfPlateManage wcfPlateManage)
    {
        wcfPlateManage.setCreateAt(new Date());
        return wcfPlateManageMapper.insertWcfPlateManage(wcfPlateManage);
    }

    /**
     * 修改展示板块管理
     *
     * @param wcfPlateManage 展示板块管理
     * @return 结果
     */
    @Override
    public int updateWcfPlateManage(WcfPlateManage wcfPlateManage)
    {
        wcfPlateManage.setUpdateAt(new Date());
        return wcfPlateManageMapper.updateWcfPlateManage(wcfPlateManage);
    }

    /**
     * 批量删除展示板块管理
     *
     * @param plateIds 需要删除的展示板块管理主键
     * @return 结果
     */
    @Override
    public int deleteWcfPlateManageByPlateIds(Long[] plateIds)
    {
        return wcfPlateManageMapper.deleteWcfPlateManageByPlateIds(plateIds);
    }

    /**
     * 删除展示板块管理信息
     *
     * @param plateId 展示板块管理主键
     * @return 结果
     */
    @Override
    public int deleteWcfPlateManageByPlateId(Long plateId)
    {
        return wcfPlateManageMapper.deleteWcfPlateManageByPlateId(plateId);
    }
}
